home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / c / amiexpress / source / ae / code / ax3.00 / console.c < prev    next >
Encoding:
C/C++ Source or Header  |  1980-01-03  |  1.1 KB  |  66 lines

  1. #include "bbs.h"
  2.  
  3. //extern int CHATF, ChatSerFlag,ChatConFlag;
  4. //extern UBYTE GUB1,SEROUT;
  5. UBYTE conin[20];
  6.  
  7. extern void CloseAEStats(void);
  8.  
  9. int CheckInput(void)
  10.     {
  11.     CheckIconifyMsg(); CheckDoorMsg(0);
  12.     return((CheckCon() || CheckSer()));
  13.     }
  14.  
  15. void FAEPutStr(char *string)
  16. {
  17.  if (IO_Flags[IOFLAG_SER_OUT]) SerPutStr(string);
  18.  if (IO_Flags[IOFLAG_SCR_OUT]) ConPutStr(string);
  19. }
  20.  
  21.  
  22. void AEPutBlk(char *string,int length)
  23. {
  24. if (IO_Flags[IOFLAG_SER_OUT]) SerPutBlk(string,length);
  25. if (IO_Flags[IOFLAG_SCR_OUT]) ConPutBlk(string,length);
  26. }
  27.  
  28. void SendChar(char ch)
  29. {
  30.    
  31. if (IO_Flags[IOFLAG_SER_OUT]) SerPutChar(&ch);
  32. if (IO_Flags[IOFLAG_SCR_OUT]) ConPutChar(&ch);
  33. }
  34.  
  35. int GetConKey(int wait)
  36. {
  37.  UBYTE gub1;
  38. if(KEYIN)
  39.     {
  40.     if (CheckIO(ReadConReq) || wait)
  41.         {
  42.         WaitIO(ReadConReq);
  43.         gub1 = conin[0];
  44.         SendIO(ReadConReq);
  45.         return((int)gub1);
  46.         }
  47.     return(TIMEOUT);
  48.     }
  49. return(0);
  50. }
  51.  
  52.  
  53. void CloseConsole(void)
  54. {
  55.  
  56.  if(WriteConReq)    {
  57.         CloseDevice(WriteConReq);
  58.         DeleteStdIO(WriteConReq);
  59.     }
  60.  if(WriteConPort) DeletePort(WriteConPort);
  61.  
  62.  if(DStatBar)    CloseAEStats();
  63. if(ReadConReq)  DeleteStdIO(ReadConReq); 
  64. if(ReadConPort) DeletePort(ReadConPort); 
  65. }
  66.